<template>
<div class="kg-head-he"></div>
<header class="kg-head reg-top" >
	<div class="dqxz" @click="$router.back()"><i class="micon">&#xe61e;</i></div>
	<div class="search_box show-cansu">
		资讯
	</div>
</header>
<div class="kg-center">
<!---->
<div class="hy-bgcenter f_cb">
	<div class="hy-newsbox">
		<div class="xy-newsli" v-for="news in xwList" :key="news.article_id">  
			<router-link :to="`/info?id=${news.article_id}`" >  
			<h2>{{ news.title }}</h2>  
			<p>{{ news.description }}</p>  
		</router-link>
	</div> 
	</div>
</div>

</div>
</template>

<script>
import {list} from '@/api/news/index'
export default {
  name: 'Index',
  data(){
	return{
      isLoading: false,// 正在加载
	  xwList: [],  
      last_page:0,
	  current_page:0
	}
  },
  created () {
    // 初始化页面
    this.init()
  },
  methods: {
	// 初始化页面
    init () {
		list().then((res)=>{
			console.log(res.data)  
			this.xwList = res.data.list.data ;
			this.last_page = res.data.list.last_page;
		})
    },

  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
::v-deep body,::v-deep html{background: #f3f0e9;}
.kg-center{padding-top: 0;  overflow-x: hidden;}
</style>
